package com.bwie.bwedu.utils;

import android.widget.ImageView;

import com.bwie.bwedu.R;
import com.bwie.bwedu.application.App;
import com.squareup.picasso.Picasso;

/**
 * Created by zhang on 2016/7/22.
 */
public class PicassoUtils {
    public static void getImage(String url, ImageView imageView){
//        Placeholders-空白或者错误占位图片：picasso提供了两种占位图片，未加载完成或者加载发生错误的时需要一张图片作为提示。
        Picasso.with(App.getContext()).load(url).resize(50,50).centerCrop().placeholder(R.drawable.night_biz_news_newspage_menu_uncollect_icon).error(R.drawable.night_biz_news_newspage_uncollect_icon).into(imageView);
    }
}
